Carbon


SetTheme

Header: Appearance.h Carbon status: Supported

Sets a specified collection as the current theme.

OSStatus SetTheme (
    Collection ioCollection
);
Parameter descriptions
ioCollection

A value of type Collection. Pass a reference to a collection object, such as that created by calling the Collection Manager function NewCollection. Before calling SetTheme, set the collection to contain theme data that you wish to use for the current theme. The theme data is in the form of collection items, each corresponding to an attribute of the theme. For a given theme, the actual number of collection items may vary, depending upon how fully the theme’s attributes are specified. Your application can use theme collection tags, along with various Collection Manager functions, to access the data in the collection. See “Theme Collection Tags” for descriptions of the possible theme collection items.

function result

A result code.

DISCUSSION

The SetTheme function sets the attributes of the current theme. You may use SetTheme to set up a custom theme environment for your application, to be used only when your application is active. You may also use SetTheme to create a theme environment that you want to be user-selectable and to have systemwide effect.

Your application can use the GetTheme function to obtain a collection containing a copy of the data for the current theme.

VERSION NOTES

This function is available with Appearance Manager 1.1 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)